package com.example.business.request;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;

public class SbOrderRequest {
    /**
     * ID
     */
    private Long id;

    /**
     * 订单流水号
     */
    @NotBlank(message = "【订单流水号】不能为空")
    @Size(max = 255)
    private String no;

    /**
     * 下单的用户 ID
     */
    private Long userId;

    /**
     * 收货地址
     */
    @NotBlank(message = "【收货地址】不能为空")
    @Size(max = 255)
    private String address;

    /**
     * 订单总金额
     */
    @NotNull(message = "【订单总金额】不能为空")
    private BigDecimal totalAmount;

    /**
     * 订单备注
     */
    @Size(max = 255)
    private String remark;

    /**
     * 支付时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date paidAt;

    /**
     * 支付方式
     */
    @Size(max = 255)
    private String paymentMethod;

    /**
     * 支付平台订单号
     */
    @Size(max = 255)
    private String paymentNo;

    /**
     * 物流状态
     */
    @Size(max = 255)
    private String shipStatus;

    /**
     * 物流数据
     */
    @Size(max = 255)
    private String shipData;

    /**
     * 订单状态
     */
    @Size(max = 255)
    private String status;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createdAt;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updatedAt;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getPaidAt() {
        return paidAt;
    }

    public void setPaidAt(Date paidAt) {
        this.paidAt = paidAt;
    }

    public String getPaymentMethod() {
        return paymentMethod;
    }

    public void setPaymentMethod(String paymentMethod) {
        this.paymentMethod = paymentMethod;
    }

    public String getPaymentNo() {
        return paymentNo;
    }

    public void setPaymentNo(String paymentNo) {
        this.paymentNo = paymentNo;
    }

    public String getShipStatus() {
        return shipStatus;
    }

    public void setShipStatus(String shipStatus) {
        this.shipStatus = shipStatus;
    }

    public String getShipData() {
        return shipData;
    }

    public void setShipData(String shipData) {
        this.shipData = shipData;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", no=").append(no);
        sb.append(", userId=").append(userId);
        sb.append(", address=").append(address);
        sb.append(", totalAmount=").append(totalAmount);
        sb.append(", remark=").append(remark);
        sb.append(", paidAt=").append(paidAt);
        sb.append(", paymentMethod=").append(paymentMethod);
        sb.append(", paymentNo=").append(paymentNo);
        sb.append(", shipStatus=").append(shipStatus);
        sb.append(", shipData=").append(shipData);
        sb.append(", status=").append(status);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", updatedAt=").append(updatedAt);
        sb.append("]");
        return sb.toString();
    }
}